package user

import (
	"github.com/gin-gonic/gin"
)

// Params 登陆验证的参数
type Params struct {
	UserName string `json:"user_name" binding:"gte=1,lte=32"`
	Password string `json:"password" binding:"required"`
}

func Validator(params interface{}, c *gin.Context) (err error) {
	return c.ShouldBind(&params)
}
